From: Dave Love Date: Fri, 24 Jan 2003 12:24:13 +0000 (+0000) Subject: (mark_stack) [!GC_LISP_OBJECT_ALIGNMENT && __GNUC__]: X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~28640 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=78c1422fce89de3a1b390db297092287d9ace4a3;p=emacs.git (mark_stack) [!GC_LISP_OBJECT_ALIGNMENT && __GNUC__]: Use __alignof__. --- diff --git a/src/alloc.c b/src/alloc.c index 10c4f6f235d..fb15f883175 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3774,6 +3774,9 @@ mark_stack () /* This trick flushes the register windows so that all the state of the process is contained in the stack. */ + /* Fixme: Code in the Boehm GC sugests flushing (with `flushrs') is + needed on ia64 too. See mach_dep.c, where it also says inline + assembler doesn't work with relevant proprietary compilers. */ #ifdef sparc asm ("ta 3"); #endif @@ -3804,7 +3807,11 @@ mark_stack () that's not the case, something has to be done here to iterate over the stack segments. */ #ifndef GC_LISP_OBJECT_ALIGNMENT +#ifdef __GNUC__ +#define GC_LISP_OBJECT_ALIGNMENT __alignof__ (Lisp_Object) +#else #define GC_LISP_OBJECT_ALIGNMENT sizeof (Lisp_Object) +#endif #endif for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT) mark_memory ((char *) stack_base + i, end);